home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / SourceCode / NeXTWORLD_DragLab / DragView.h < prev    next >
Text File  |  1995-06-12  |  2KB  |  51 lines

  1. //
  2. //    A View that implements Dragging in 3.0
  3. //    Greg Burd
  4. //        Copyright NeXT Computer, Inc 1992 All Rights Reserved
  5. //
  6. //    Created 7-4-92 -- (Improved from existing code by Randy Nelson)
  7. //
  8. //    You may freely copy, distribute and reuse the code in this example.
  9. //    NeXT disclaims any warranty of any kind, expressed or implied, as to
  10. //    its fitness for any particular use.
  11. //
  12.  
  13. #import <appkit/View.h>
  14.  
  15. @interface DragView:View
  16. {
  17.     id         theImage;
  18.     id         textObj;
  19.     BOOL    framed;
  20.     BOOL    drawBackground;
  21. }
  22.  
  23. /*-------------------- methods to get things set up */
  24. - initFrame:(const NXRect *)theFrame;
  25. - awakeFromNib;
  26.  
  27. /*-------------------- methods to be the source of a dragging operation */
  28. - mouseDown:(NXEvent *)theEvent;
  29. - draggedImage:(NXImage *)image beganAt:(NXPoint *)screenPoint;
  30. - (NXDragOperation)draggingSourceOperationMaskForLocal:(BOOL)flag;
  31. - draggedImage:(NXImage *)image endedAt:(NXPoint *)screenPoint deposited:(BOOL)flag;
  32.  
  33. /*-------------------- methods to be the destination of a dragging operation */
  34. - (NXDragOperation)draggingEntered:sender;
  35. - (NXDragOperation)draggingUpdated:sender;
  36. - draggingExited:sender;
  37. - (BOOL)prepareForDragOperation:sender;
  38. - (BOOL)performDragOperation:sender;
  39. - concludeDragOperation:sender;
  40.  
  41. /*-------------------- methods to display, and other useful stuff */
  42. - (BOOL)acceptsFirstMouse;
  43. - (BOOL)shouldDelayWindowOrderingForEvent:(NXEvent *)theEvent;
  44. - sizeTo:(NXCoord)x :(NXCoord)y;
  45. - open:sender;
  46. - setImage:(id)anImage;
  47. - drawSelf:(const NXRect *)rects :(int)num;
  48. - free;
  49.  
  50. @end
  51.